namespace Framework
{
    public class UntilFail<T> : Decorator<T>
    {
        public override TaskStatus Update(T context)
        {
            TaskStatus status = child.Update(context);
            if (status != TaskStatus.Failure)
            {
                return TaskStatus.Running;
            }

            return TaskStatus.Success;
        }
    }
}